//引入express模块
const express = require("express");
const path=require('path');
const bodyParser= require('body-Parser');
// 创建app应用对象
const app =express();
app.post("/register", (req, res) => {
     console.log(req.body); 
     res.send("post接收"); 
    });
app.use(bodyParser.urlencoded({extended:true}));
app.use('/static', express.static(path.join(__dirname, 'public')))
//监听
app.listen(3000,err=>{
    if(!err) console.log('sever 启动！');
    else console.log(err);
})

